{% extends 'pages.html' %}

  {%block title%}<title>{{page_name}} - Creoleparser sandbox wiki</title>{%endblock title%}

{%block javascript%}  

<script type="text/javascript" src="/static/js/page.js" ></script>

{%endblock javascript%}  

{%block toggler%}<li><a id='toggler' href='#'>Toggle Editor</a></li>{%endblock toggler%}

    {%block editor%}
    <div id="editor" class="{{editor_class}}">
    
      <form method="post" action="{{action}}">
        <div>
        <textarea  rows="18" cols="80" id="text" name="text">{{page.body.value|escape}}
        </textarea><br />
        {%if user%}Viewers: <input size="80" name="viewers" type="text" value="{{viewers}}" /><br />{%endif%}
        <button type="button" name="preview" id="preview">Preview</button><em id="loading"></em>
        <button type="submit" value="Save" >Save</button>
        <button type="submit" name="cancel" value="cancel">Cancel</button>
        
        <input type="hidden" name="page_name" id="page_name" value="{{page_name}}" />
        </div>
      </form>
    </div>
    {%endblock editor%}
    
    {%block wikicontent%}
        {{rendered_text}}
    {%endblock wikicontent%}    
